# -*- coding: utf-8 -*-
"""
Created on Fri Dec 13 16:10:35 2013

@author: Liang Zhang
"""
from FDR import FDR
from WHT import WHT
from testset import testset
#from OSHC import OSHC
import matplotlib.pyplot as plt
import numpy as np
#import cfunc
from xlwt import Workbook
#from VSHC import VSHC,VSHC2

def __TEST__(ts):
    
    d=ts.data
    
    
#     with open(ts.name+'.reorder.wht','w') as f:
#         for v in _d:
#             for c in v:
#                 f.write(m[c])
#             f.write('\n')
                

#########################################
#    plt.figure(ts.name)
#    plt.subplot(111)
#    plt.plot(r,label='')
#    plt.legend()
#    plt.title(ts.name)
#    plt.xlabel('')
#    plt.ylabel('')
#    plt.show()
    return 0

def ALL_TEST(tslist):
    total=0
    num=0
    for ui_ts in tslist:
        if not ui_ts.choose:continue
        ts=testset(ui_ts.filename)       
        total+=__TEST__(ts) 
        num+=1
    print total/num
    
######################################################################

if __name__=="__main__":
    ts=testset('../data/mintest/s337')
    r=__TEST__(ts)
